/**
 * 
 */
$(function(){
	readysubject("subject-select");
	readyresult(null);
	$("#subject-seek").click(function(){
		readyresult($("#subject-select").val());
	})
})
function readyresult(subcode) {
	$.ajax({
		url : "/blackhouse/classcj2",
		type : "post",
		data : {"subcode":subcode},
		dataType : "json",
		success : function(e) {
			var html = "";
			for (var i = 0; i < e.length; i++) {
				html += "<tr>";
				html += "<td>" + e[i].gradename + "</td>";
				html += "<td>" + e[i].classname + "</td>";
				html += "<td>" + e[i].stuCode + "</td>";
				html += "<td>" + e[i].stuName + "</td>";
				html += "<td>" + e[i].subjectName + "</td>";
				html += "<td>" + e[i].result + "分</td>";
				html += "</tr>"
			}
			$("#result-tbody").html(html);
		}
	})
}